package brickdestroyer.math;

/**
 * This class represents a circular shape.
 *
 * @author Momchil Atanasov
 */
public class Circle2D extends Shape2D {
    
    private static final float DEFAULT_RADIUS = 10.0f;
   
    protected float radius = DEFAULT_RADIUS;
    
    public Circle2D() {
        super();
    }

    public Circle2D(Vector2D position, float radius) {
        this(position.x, position.y, radius);
    }
    
    public Circle2D(float x, float y, float radius) {
        super(x, y);
        this.radius = radius;
    }
    
    public Circle2D(Circle2D other) {
        this(other.x, other.y, other.radius);
    }

    public void setRadius(float value) {
        radius = value;
    }

    public float getRadius() {
        return radius;
    }
    
    public float getMinX() {
        return (x - radius);
    }
    
    public float getMaxX() {
        return (x + radius);
    }
    
    public float getMinY() {
        return (y - radius);
    }
    
    public float getMaxY() {
        return (y + radius);
    }
    
    public float getSmallestSize() {
        return radius;
    }
}
